import { Entity, PrimaryColumn, Column, CreateDateColumn } from 'typeorm';

// 登录日志表 -  实体类
@Entity('monitor_online', { comment: '在线用户' })
export class OnlineEntity {
  @PrimaryColumn({ type: 'varchar', name: 'token_id', comment: '会话编号' })
  tokenId: string;

  @Column({ type: 'varchar', name: 'user_name', default: '', comment: '登录名称' })
  userName: string;

  @Column({ type: 'varchar', name: 'ip_addr', comment: '主机' })
  ipaddr: string;

  @CreateDateColumn({ type: 'datetime', name: 'login_time', default: '', comment: '登录时间' })
  loginTime: Date;
}
